<?php
/**
 * Created by PhpStorm.
 * User: mr.lee
 * Date: 2018/10/8
 * Time: 9:04 AM
 */

namespace app\apitemp\controller;


class Notify
{
    public function starpos()
    {
        $postData = file_get_contents('php://input');
        if ($postData) {
            $encode = mb_detect_encoding($postData, array("ASCII", 'UTF-8', "GB2312", "GBK", 'BIG5'));
            $postData = iconv($encode, 'UTF-8', $postData);

           file_put_contents('/data2/html/osapi/starpos.log',json_encode($postData),8);
        }

        echo "success";
    }

    public function index()
    {
        echo 1234;
    }
}